<template>
  <div class="category">
      <h2>{{title}}分类</h2>
      <ul>
          <li v-for ="(item,index) in list" :key="index">{{item}}</li>
      </ul>
  </div>
</template>

<script>
  export default {
      name:'Category',
      props:['title','list']
  }
</script>

<style scoped>
  .category{
      background-color: skyblue;
      width: 300px;
  }
  h2{
      background-color: orange;
      text-align: center;
  }
</style>